<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateFilesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('files', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name')->default('')->index('files_name');
			$table->string('desc')->default('');
			$table->integer('project')->default(0)->index('files_project');
			$table->integer('milestone')->default(0);
			$table->integer('user')->default(0);
			$table->string('tags')->default('')->index('files_tags');
			$table->string('added')->default('')->index('files_added');
			$table->string('datei')->default('')->index('files_datei');
			$table->string('type')->default('');
			$table->string('title')->default('');
			$table->integer('folder');
			$table->text('visible', 65535);
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('files');
	}

}
